{include file="public/header" /}
<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5>批量审核</h5>
                    <div class="ibox-tools">
                        <a class="collapse-link">
                            <i class="fa fa-chevron-up"></i>
                        </a>
                    </div>
                </div>
                <div class="ibox-content">
                    <form class="form-horizontal" name="userAdd" id="userAdd">
                        <input type="hidden" name="ids" value="{$ids}">

                        <div class="form-group">
                            <label class="col-sm-3 control-label">审核结果：</label>
                            <div class="layui-input-block">
                                <label><input type="radio" name="in_status" value="2" checked>通过&nbsp;</label>
                                <label><input type="radio" name="in_status" value="3">驳回</label>
                            </div>
                        </div>

                        <div class="hr-line-dashed"></div>
                        <div class="form-group">
                            <div class="col-sm-4 col-sm-offset-3">
                                <button class="btn btn-primary btsave" type="button" id="audit"><i class="fa fa-save"></i> 审核
                                </button>
                                &nbsp;&nbsp;&nbsp;
                                <a class="btn btn-danger" href="javascript:history.go(-1);"><i class="fa fa-close"></i>
                                    返回</a>
                            </div>
                        </div>
                    </form>
                </div>
            </div>

        </div>
    </div>
</div>
{include file="public/footer" /}

<script type="text/javascript" src="__JS__/Crop.js"></script>
<script type="text/javascript" src="__JS__/jquery.min.js"></script>
<script type="text/javascript">

    $("#audit").click(function(){
//                $('button').attr('disabled', 'disabled');
        $.ajax({
            url: "{:url('Building/doAuditAll')}",
            type: "post",
            dataType: "json",
            data: $("#userAdd").serialize(),
            success: function (data) {
                if (data.code == 200) {
                    wk.success(data.msg, "{:url('Building/index')}")
                } else {
                    $('button').removeAttr('disabled');
                    wk.error(data.msg, '', '$(".layui-btn").removeClass(\'layui-disabled\').removeAttr(\'disabled\');');
                    return false;
                }
            }
        });
    })
</script>
</body>
</html>